package org.ecpkn.PAGridSim.FUPAOptimization;

import org.ecpkn.PAGridSim.core.gridsimEntity.paMachine.PAMachine;

public class FUPAMachine extends PAMachine {

	public FUPAMachine(int id, int numPE, int ratingPE) {
		super(id, numPE, ratingPE);
	}

	@Override
	public double getPower(double frequency,double utilization) {
		frequency=frequency/1000;
		double power = getNumPE()
				* (FUPAOptimization.Const.PARAM_A * frequency * frequency
						* frequency + FUPAOptimization.Const.PARAM_B
						* utilization * frequency * frequency
						* frequency + utilization
						* FUPAOptimization.Const.PARAM_C + FUPAMachine.POWERSTATIQUE);
		return power;
	}
}
